<template>
  <div id="app">
    <transition name="fade">
      <div v-if="loading" class="new-loading">
        <i class="el-icon-loading" />
      </div>
    </transition>
    <router-view />
  </div>
</template>

<script>
import { mapGetters } from 'vuex'
import '@/assets/fonts/iconfont/common.scss'
export default {
  name: 'App',
  components: {

  },
  computed: {
    ...mapGetters(['loading'])
  }
}
</script>

<style lang="scss">
html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
}
.new-loading {
  position: fixed;
  width: 100%;
  background-color: hsla(0, 0%, 100%, 0.6);
  bottom: 0;
  top: 0;
  z-index: 9999;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
</style>
